#!/sbin/openrc-run
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

depend() {
	use dns
}

start() {
	ebegin "Starting bareos file daemon"
	checkpath -d -m 0750 -o root:bareos /run/bareos
	start-stop-daemon --start --quiet --exec /usr/sbin/bareos-fd \
		-- -p /run/bareos/bareos-fd.9102.pid ${FD_OPTIONS}
	eend $?
}

stop() {
	ebegin "Stopping bareos file daemon"
	start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-fd.9102.pid
	eend $?
}
